nethackfandomcom-20200214-history
Source:NetHack 2.2a/decl.c
Below is the full text to decl.c from the source code of NetHack 2.2a. To link to a particular line, write [[NetHack 2.2a/decl.c#line123]], for example. Warning! This is the source code from an old release. For the latest release, see Source code 1. /* SCCS Id: @(#)decl.c 2.1 87/10/19 2. /* Copyright © Stichting Mathematisch Centrum, Amsterdam, 1985. */ 3. 4. #include "hack.h" 5. char nul40; /* contains zeros */ 6. char plnamePL_NSIZ; /* player name */ 7. 8. #ifdef GRAPHICS 9. struct symbols defsyms = { 10. ' ', '|', '-', '-', '-', '-', '-', '+', '.', '#', '<', '>', '^', 11. #ifdef FOUNTAINS 12. '}', '{', 13. #endif 14. #ifdef NEWCLASS 15. '\\', 16. #endif 17. #ifdef SPIDERS 18. '"', 19. #endif 20. }; 21. struct symbols showsyms; /* will contain the symbols actually used */ 22. #endif /* GRAPHICS /**/ 23. 24. #ifdef DGK 25. char hackdirPATHLEN; /* where rumors, help, record are */ 26. char levelsPATHLEN; /* where levels are */ 27. char lockFILENAME; /* pathname of level files */ 28. char permbonesPATHLEN; /* where permanent copy of bones go */ 29. int ramdisk = FALSE; /* whether to copy bones to levels or not */ 30. struct symbols symbol = {'|', '-', '-', '-', '-', '-', '+', '.', '#'}; 31. int saveprompt = TRUE; 32. char *alllevels = "levels.*"; 33. char *allbones = "bones.*"; 34. char *configfile = "NetHack.cnf"; /* read by read_config_file() */ 35. #else 36. char lockPL_NSIZ+4 = "1lock"; /* long enough for login name .99 */ 37. #endif 38. 39. boolean in_mklev, restoring; 40. struct rm levlCOLNOROWNO; /* level map */ 41. 42. #ifndef QUEST 43. #include "mkroom.h" 44. struct mkroom roomsMAXNROFROOMS+1; 45. coord doorsDOORMAX; 46. #endif 47. struct monst *fmon = 0; 48. struct trap *ftrap = 0; 49. struct gold *fgold = 0; 50. struct obj *fobj = 0, *fcobj = 0, *invent = 0, *uwep = 0, *uarm = 0, 51. *uarm2 = 0, *uarmh = 0, *uarms = 0, *uarmg = 0, *uright = 0, 52. *uleft = 0, *uchain = 0, *uball = 0; 53. struct flag flags; 54. struct you u; 55. #ifdef SPELLS 56. struct spell spl_book+ 1; 57. #endif 58. struct rm levlCOLNOROWNO; /* level map */ 59. struct monst youmonst; /* dummy; used as return value for boomhit */ 60. 61. xchar dlevel = 1; 62. xchar xupstair, yupstair, xdnstair, ydnstair; 63. char *save_cm = 0, *killer, *nomovemsg; 64. 65. long moves = 1; 66. long wailmsg = 0; 67. int multi = 0; 68. char *occtxt; 69. #ifdef DGKMOD 70. int occtime; 71. #endif 72. #ifdef REDO 73. int in_doagain = FALSE; 74. #endif 75. 76. char *HI, *HE; /* set up in termcap.c */ 77. #ifdef MSDOSCOLOR 78. char *HI_MON, *HI_OBJ; /* set up in termcap.c */ 79. #endif 80. 81. char genocided60; 82. char fut_geno60; 83. #ifdef KAA 84. boolean stoned; /* done to monsters hit by 'c' */ 85. boolean unweapon; 86. #endif 87. 88. xchar curx,cury; 89. xchar seelx, seehx, seely, seehy; /* corners of lit room */ 90. 91. coord bhitpos; 92. 93. char quitchars[] = " \r\n\033"; decl.c